
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type DiyRequest struct {

	Version string `json:"version" form:"version"`

	Name string `json:"name" form:"name"`

	TemplateName string `json:"template_name" form:"template_name"`

	Value string `json:"value" form:"value"`

	DefaultValue string `json:"default_value" form:"default_value"`

	AddTime string `json:"add_time" form:"add_time"`

	UpdateTime string `json:"update_time" form:"update_time"`

	Status string `json:"status" form:"status"`

	Type string `json:"type" form:"type"`

	IsShow string `json:"is_show" form:"is_show"`

	IsBgColor string `json:"is_bg_color" form:"is_bg_color"`

	IsBgPic string `json:"is_bg_pic" form:"is_bg_pic"`

	ColorPicker string `json:"color_picker" form:"color_picker"`

	BgPic string `json:"bg_pic" form:"bg_pic"`

	BgTabVal string `json:"bg_tab_val" form:"bg_tab_val"`

	IsDel string `json:"is_del" form:"is_del"`

	OrderStatus string `json:"order_status" form:"order_status"`

	MyBannerStatus string `json:"my_banner_status" form:"my_banner_status"`

	IsDiy string `json:"is_diy" form:"is_diy"`

	Title string `json:"title" form:"title"`

}

func (r *DiyRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *DiyRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"version": "required",

		"name": "required",

		"template_name": "required",

		"value": "required",

		"default_value": "required",

		"add_time": "required",

		"update_time": "required",

		"status": "required",

		"type": "required",

		"is_show": "required",

		"is_bg_color": "required",

		"is_bg_pic": "required",

		"color_picker": "required",

		"bg_pic": "required",

		"bg_tab_val": "required",

		"is_del": "required",

		"order_status": "required",

		"my_banner_status": "required",

		"is_diy": "required",

		"title": "required",

	}
}

func (r *DiyRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *DiyRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *DiyRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
